<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2018-10-23T06:18:10.521000000">
    <meta name="changed" content="2018-10-23T06:18:42.262000000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="de">
    <title>Benutzung der Kommandozeile
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="maindiv">

<h1>Benutzung der Kommandozeile</h1>

<blockquote><em>Subsections:</em>
<br><a href="sub.html">Substituting libraries</a>
<br><a href="other.html">Other verification options</a>
<br><a href="multi.html">Testing multiple files</a>
</blockquote>

<p>Logisim includes basic support for executing circuits from the command-line.
This is intended both to help with scripted verification of circuit designs
and to help instructors perform automated testing of students' solutions.</p>

<p>We'll start by seeing how to execute a circuit from the command line.
For our example, we'll suppose we've built the below circuit in a file named <tt>adder-test.circ</tt>.
It uses a two-bit adder as a subcircuit
and iterates using a counter through all 16 possible inputs to it.</p>

<blockquote><img src="../../../../img-guide/verify-adder-test.png"></blockquote>

<p>After this circuit has been built, we then execute Logisim from the command line,
providing the filename of the project
and the <q>-tty</q> option with the <q>table</q> parameter.</p>

<blockquote><tt>java -jar logisim-filename.jar adder-test.circ -tty table</tt></blockquote>

<p>Without bringing up any windows, Logisim loads the circuit and begins to execute it,
ticking any clocks as fast as it can while completing the propagation between each tick.
After each propagation is completed, Logisim loads the current values of the output pins;
if any have changed from the previous propagation,
then all values are displayed in tab-delimited format.
If there is an output pin labeled with the special word <q>halt</q>,
its output is not displayed — but once the pin's value reaches 1 after
a propagation is completed, Logisim ends the simulation.</p>

<p>For our example, Logisim displays the table below. Because we have two output
pins corresponding to the two inputs <var>a</var> and <var>b</var> into the
two-bit adder, these outputs are included as the first two columns of the output.
And there is another output pin corresponding to the two-bit adder's output,
so it is the third column.
The columns are ordered left-to-right according to the top-down ordering within
the circuit.</p>

<blockquote><pre>
00      00      000
01      00      001
10      00      010
11      00      011
00      01      001
01      01      010
10      01      011
11      01      100
00      10      010
01      10      011
10      10      100
11      10      101
00      11      011
01      11      100
10      11      101
11      11      110
</pre></blockquote>

<p><strong>Next:</strong> <a href="sub.html">Substituting libraries</a>.</p>
</div></body></html>
